package User_index;

import java.sql.ResultSet;
import java.sql.SQLException;

import MYJDBC.jdbc;

public class User_Login {
	
//	获取用户的信息
	public User_dao UserLogin(String number) throws SQLException {
		
		jdbc jc = new jdbc();
		ResultSet rs = jc.SqlRs("select * from user_index where user_number = "+number+";");
		User_dao user = new User_dao();
		while(rs.next()) {
			user.setUser_id(rs.getInt("user_id"));
			user.setUser_name(rs.getString("user_name"));
			user.setUser_pasd(rs.getString("user_pasd"));
			user.setUser_number(rs.getString("user_number"));
			user.setUser_img(rs.getString("user_img"));
			user.setUser_xb(rs.getInt("user_xb"));
			user.setUser_dress(rs.getString("user_dress"));
			user.setUser_hongt(rs.getInt("user_hongt"));
		}
		jc.QueryClose();
		
		return user;
	}
	
	

}
